package com.zpark.entity.patients;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 急救指南信息表
 * @TableName first_aid_guides
 */
@TableName(value ="first_aid_guides")
@Data
public class FirstAidGuides implements Serializable {
    /**
     * 指南ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 指南标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 简要描述
     */
    @TableField(value = "brief")
    private String brief;

    /**
     * 分类(创伤急救/烧伤烫伤/中毒等)
     */
    @TableField(value = "category")
    private String category;

    /**
     * 紧急程度
     */
    @TableField(value = "severity")
    private Object severity;

    /**
     * 适用症状描述
     */
    @TableField(value = "symptoms")
    private String symptoms;

    /**
     * 急救步骤(JSON数组格式)
     */
    @TableField(value = "steps")
    private Object steps;

    /**
     * 注意事项(JSON数组格式)
     */
    @TableField(value = "notes")
    private Object notes;

    /**
     * 紧急联系方式
     */
    @TableField(value = "emergency_contact")
    private String emergencyContact;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at")
    private Date updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FirstAidGuides other = (FirstAidGuides) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getBrief() == null ? other.getBrief() == null : this.getBrief().equals(other.getBrief()))
            && (this.getCategory() == null ? other.getCategory() == null : this.getCategory().equals(other.getCategory()))
            && (this.getSeverity() == null ? other.getSeverity() == null : this.getSeverity().equals(other.getSeverity()))
            && (this.getSymptoms() == null ? other.getSymptoms() == null : this.getSymptoms().equals(other.getSymptoms()))
            && (this.getSteps() == null ? other.getSteps() == null : this.getSteps().equals(other.getSteps()))
            && (this.getNotes() == null ? other.getNotes() == null : this.getNotes().equals(other.getNotes()))
            && (this.getEmergencyContact() == null ? other.getEmergencyContact() == null : this.getEmergencyContact().equals(other.getEmergencyContact()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getBrief() == null) ? 0 : getBrief().hashCode());
        result = prime * result + ((getCategory() == null) ? 0 : getCategory().hashCode());
        result = prime * result + ((getSeverity() == null) ? 0 : getSeverity().hashCode());
        result = prime * result + ((getSymptoms() == null) ? 0 : getSymptoms().hashCode());
        result = prime * result + ((getSteps() == null) ? 0 : getSteps().hashCode());
        result = prime * result + ((getNotes() == null) ? 0 : getNotes().hashCode());
        result = prime * result + ((getEmergencyContact() == null) ? 0 : getEmergencyContact().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", title=").append(title);
        sb.append(", brief=").append(brief);
        sb.append(", category=").append(category);
        sb.append(", severity=").append(severity);
        sb.append(", symptoms=").append(symptoms);
        sb.append(", steps=").append(steps);
        sb.append(", notes=").append(notes);
        sb.append(", emergencyContact=").append(emergencyContact);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}